namespace Specifications
{
    using System.IO;
    using System.Reflection;
    using System.Xml;
    using FriendFeed;

    public static class Provide
    {
        public static Feed AFeedWithASingleEntry()
        {
            var xml = new XmlDocument();
            const string markup =
                @"
<feed>
    <entry>
        <updated>2008-11-04T16:09:27Z</updated>
        <service>
          <profileUrl>http://devlicio.us/blogs/christopher_bennage/default.aspx</profileUrl>
          <iconUrl>http://friendfeed.com/static/images/icons/blog.png?v=d3fe9e9d1dd09839623e597a92ecbb00</iconUrl>
          <id>blog</id>
          <name>Christopher Bennage</name>
        </service>
        <title>The Upcoming NHibernate Profiler</title>
        <link>http://devlicious.com/blogs/christopher_bennage/archive/2008/11/04/the-upcoming-nhibernate-profiler.aspx</link>
        <anonymous>False</anonymous>
        <published>2008-11-04T16:09:27Z</published>
        <hidden>False</hidden>
        <id>ac9f303e-1be6-6822-d83a-c44eae31f7bf</id>
        <user>
          <profileUrl>http://friendfeed.com/bennage</profileUrl>
          <nickname>bennage</nickname>
          <id>0184a0ee-4783-11dd-9a51-003048343a40</id>
          <name>Christopher Bennage</name>
        </user>
    </entry>
</feed>";
            xml.LoadXml(markup);
            return new Feed(xml.DocumentElement);
        }

        public static Feed AnExampleHomeFeed()
        {
            Assembly asm = Assembly.GetExecutingAssembly();
            Stream stream = asm.GetManifestResourceStream("Specifications.Data.sample_home_feed.xml");

            var doc = new XmlDocument();
            doc.Load(stream);
            return new Feed(doc.DocumentElement);
        }
    }
}